package com.zenithmind.exam.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.zenithmind.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;

/**
 * 考试分类实体类
 * 
 * @author ZenithMind
 * @since 2024-07-01
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(name = "考试分类实体", description = "考试分类信息")
@TableName("exam_category")
public class ExamCategory extends BaseEntity {

    /**
     * 分类名称
     */
    @NotBlank(message = "分类名称不能为空")
    @Size(max = 100, message = "分类名称长度不能超过100个字符")
    @Schema(description = "分类名称")
    private String name;

    /**
     * 分类描述
     */
    @Schema(description = "分类描述")
    private String description;

    /**
     * 父分类ID
     */
    @Schema(description = "父分类ID")
    private String parentId;

    /**
     * 分类层级
     */
    @Schema(description = "分类层级")
    private Integer level;

    /**
     * 图标URL
     */
    @Schema(description = "图标URL")
    private String iconUrl;

    /**
     * 排序值
     */
    @Schema(description = "排序值")
    private Integer sortOrder;

    /**
     * 状态（0:禁用, 1:启用）
     */
    @Schema(description = "状态（0:禁用, 1:启用）")
    private Integer status;
}
